// <copyright file="IPathFinder.cs" company="Gustavo Franco">
// Copyright (c) 2006 All Right Reserved
// </copyright>
// <author>Gustavo Franco</author>
// <email>gustavo_franco@hotmail.com</email>
// <date>2006</date>
// <summary>Interface for providing access to the pathfinder algorithm.</summary>

// Work done by Robert Tenney on this library: PathFinder, is based off of the previous work
// done by: Franco, Gustavo.

using System;
using System.Drawing;

namespace TenneySoftware.Engine.Algorithms.Pathfinder {
    /// <summary>
    /// Interface for providing access to the pathfinder algorithm.
    /// </summary>
    [Author("Franco, Gustavo")]
    public interface IPathfinder {
        #region Properties
        /// <summary>
        /// Gets a value indicating whether the algorithm was stopped or not.
        /// </summary>
        /// <value>
        /// A value indicating whether the algorithm was stopped or not.
        /// </value>
        bool Stopped {
            get;
        }

        /// <summary>
        /// Gets or sets the formula used for heuristics.
        /// </summary>
        /// <value>
        /// The formula used for heuristics.
        /// </value>
        HeuristicFormula Formula {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether or not to allow diagonals.
        /// </summary>
        /// <value>
        /// A value indicating whether or not to allow diagonals.
        /// </value>
        bool Diagonals {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether or not to score diagonals heavily.
        /// </summary>
        /// <value>
        /// A value indicating whether or not to score diagonals heavily.
        /// </value>
        bool HeavyDiagonals {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value for use by the heuristic formula for it's estimation.
        /// </summary>
        /// <value>
        /// A value for use by the heuristic formula for it's estimation.
        /// </value>
        int HeuristicEstimate {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether or not to score directional changes more heavily.
        /// </summary>
        /// <value>
        /// A value indicating whether or not to score directional changes more heavily.
        /// </value>
        bool PunishChangeDirection {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether or not to perform additional math to break the tie.
        /// </summary>
        /// <value>
        /// A value indicating whether or not to perform additional math to break the tie.
        /// </value>
        bool Tiebreaker {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value to set the search limit to.
        /// </summary>
        /// <value>
        /// A value to set the search limit to.
        /// </value>
        int SearchLimit {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the time taken to complete the algorithm.
        /// </summary>
        /// <value>
        /// The time taken to complete the algorithm.
        /// </value>
        double CompletedTime {
            get;
            set;
        }
        #endregion

        #region Methods
        /// <summary>
        /// Causes the path finder algorithm to stop if it is currently running.
        /// </summary>
        void FindPathStop();

        /// <summary>
        /// Starts the path finding algorithm.
        /// </summary>
        /// <param name="start">Start of the path.</param>
        /// <param name="destination">End of the path.</param>
        /// <returns>A list of nodes with the path finder's solution.</returns>
        PathfinderNodeCollection FindPath(Point start, Point destination);
        #endregion
    }
}
